<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" src="/static/js/jquery-1.8.0.min.js"></script>
    <script type="text/javascript">
        $(function () {
            $("#rtype").blur(function () {
                var value = document.getElementById("rtype").value;
                var reg = /^[1-2]\d*$|^0$/;
                if (reg.test(value) == true && value.length==1) {
                    $("#Msg").html("");
                } else {
                    $("#Msg").html("请输入正确的格式：(1.采购入库，2.退货入库)").css("color", "red");
                }
            })
        })
    </script>
</head>
<body>
<form action="/rstore/update" method="post">
    <div>
        <table style="background-color: white">
            <tr>
                <td>入库单号</td><td><input type="text" name="ruid" id="ruid" value="${rstore.ruid}" readonly></td>
            </tr>
            <tr>
                <td>源订单ID</td>
                <td><input type="text" name="oid" value="${rstore.oid}" required></td>
            </tr>
            <tr>
                <td>类型</td>
                <td><input type="text" name="rtype" id="rtype" value="${rstore.rtype}" required><label id="Msg"></label></td>
            </tr>
            <tr>
                <td>供应商/客户名称</td><td><input type="text" name="rname" value="${rstore.rname}" required></td>
            </tr>
            <tr>
                <td>入库仓库</td>
                <td>
                    <select name="gnid">
                        <#list gnumbers as g>
                            <option value="${g.gnid}">${g.gname}</option>
                        </#list>
                    </select>
                </td>
            </tr>
            <tr>
                <td>经办人</td><td><input type="text" name="storeadmin" value="${rstore.storeadmin}" required></td>
            </tr>
            <tr>
                <td>状态</td>
                <td>
                    <select name="state">
                        <option value="3" selected>待入库</option>
                        <option value="1">待记账</option>
                        <option value="2">已入库</option>
                    </select>
                </td>
            </tr>
            <tr></tr>
        </table>
    </div>
    <div>
        <table>
            <tr>
                <td><input type="submit" id="submit" value="提交"></td>
                <td><input type="reset" ></td>
            </tr>
        </table>
    </div>
</form>
</body>
</html>